package com.agp.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.Pattern;


/**
 * 用户登录
 */
@Data
@ApiModel("用户登录、注册DTO")
public class UserLoginDTO {
    //手机号
    @NotBlank(message = "手机号不能为null、空字符串和空白串")
    @Pattern(regexp = "^1[3-9]\\d{9}$", message = "手机号格式错误")
    @ApiModelProperty("手机号")
    private String phone;

    //密码
    @ApiModelProperty("密码")
    private String password;

    //验证码
    @ApiModelProperty("验证码")
    private String captcha;

    //用户角色
    @ApiModelProperty("用户角色")
    private Integer role;
}
